//
//  DeviceUnScanView.swift
//  hamaton-app
//
//  Created by intyt on 2024/3/26.
//

import UIKit
import SnapKit

class HamatonDeviceUnScanView: UIView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        setupUI()
    }
    
    func setupUI() {
        backgroundColor = .clear
        addSubview(titleLabel)
        addSubview(button)

        titleLabel.snp.makeConstraints { make in
            make.top.equalToSuperview()
            make.bottom.equalToSuperview()
            make.left.equalToSuperview()
            make.right.equalToSuperview()
            make.height.equalTo(50)
        }
        
        button.snp.makeConstraints { make in
            make.top.equalTo(titleLabel.snp.bottom).offset(-80)
            make.right.equalToSuperview().offset(-80)
            make.width.equalTo(90)
            make.height.equalTo(36)
        }
    }
    
    lazy var titleLabel: UILabel = {
        let label = UILabel(frame: .zero)
        label.font = Theme.Font.size(54, bold: true)
        label.textColor = UIColor(hex6: 0x22A1E0)
        label.numberOfLines = 1
        label.text = "Hamaton"
        label.textAlignment = .center
        return label
    }()
    
    lazy var button: UIButton = {
        let button = UIButton(type: .custom)
        button.backgroundColor = UIColor(hex6: 0x22A1E0)
        button.setTitle("管理端", for: .normal)
        button.setTitleColor(UIColor(hex6: 0xffffff, alpha: 1.0), for: .normal)
        button.layer.cornerRadius = 18
        return button
    }()
    
    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */
    
    
}
